3.216 \(\int \frac {\sin (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx\)

Optimal. Leaf size=51 \[ -\frac {\tan ^{-1}\left (\frac {\sin (c+d x) \cos (c+d x)}{\sin ^2(c+d x)+\sqrt {2}+1}\right )}{\sqrt {2} d}-\frac {x}{\sqrt {2}}+x \]

[Out]

x-1/2*x*2^(1/2)-1/2*arctan(cos(d*x+c)*sin(d*x+c)/(1+sin(d*x+c)^2+2^(1/2)))/d*2^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {1130, 203} \[ -\frac {\tan ^{-1}\left (\frac {\sin (c+d x) \cos (c+d x)}{\sin ^2(c+d x)+\sqrt {2}+1}\right )}{\sqrt {2} d}-\frac {x}{\sqrt {2}}+x \]

Antiderivative was successfully verified.

[In]

Int[Sin[c + d*x]/(Csc[c + d*x] + Sin[c + d*x]),x]

[Out]

x - x/Sqrt[2] - ArcTan[(Cos[c + d*x]*Sin[c + d*x])/(1 + Sqrt[2] + Sin[c + d*x]^2)]/(Sqrt[2]*d)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 1130

Int[((d_.)*(x_))^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[(
d^2*(b/q + 1))/2, Int[(d*x)^(m - 2)/(b/2 + q/2 + c*x^2), x], x] - Dist[(d^2*(b/q - 1))/2, Int[(d*x)^(m - 2)/(b
/2 - q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 2]

Rubi steps

\begin {align*} \int \frac {\sin (c+d x)}{\csc (c+d x)+\sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^2}{1+3 x^2+2 x^4} \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {1}{1+2 x^2} \, dx,x,\tan (c+d x)\right )}{d}+\frac {2 \operatorname {Subst}\left (\int \frac {1}{2+2 x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=x-\frac {x}{\sqrt {2}}-\frac {\tan ^{-1}\left (\frac {\cos (c+d x) \sin (c+d x)}{1+\sqrt {2}+\sin ^2(c+d x)}\right )}{\sqrt {2} d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 30, normalized size = 0.59 \[ -\frac {\tan ^{-1}\left (\sqrt {2} \tan (c+d x)\right )}{\sqrt {2} d}+\frac {c}{d}+x \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[c + d*x]/(Csc[c + d*x] + Sin[c + d*x]),x]

[Out]

c/d + x - ArcTan[Sqrt[2]*Tan[c + d*x]]/(Sqrt[2]*d)

________________________________________________________________________________________

fricas [A]  time = 0.61, size = 52, normalized size = 1.02 \[ \frac {4 \, d x + \sqrt {2} \arctan \left (\frac {3 \, \sqrt {2} \cos \left (d x + c\right )^{2} - 2 \, \sqrt {2}}{4 \, \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="fricas")

[Out]

1/4*(4*d*x + sqrt(2)*arctan(1/4*(3*sqrt(2)*cos(d*x + c)^2 - 2*sqrt(2))/(cos(d*x + c)*sin(d*x + c))))/d

________________________________________________________________________________________

giac [A]  time = 0.22, size = 82, normalized size = 1.61 \[ \frac {2 \, d x - \sqrt {2} {\left (d x + c + \arctan \left (-\frac {\sqrt {2} \sin \left (2 \, d x + 2 \, c\right ) - 2 \, \sin \left (2 \, d x + 2 \, c\right )}{\sqrt {2} \cos \left (2 \, d x + 2 \, c\right ) + \sqrt {2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 2}\right )\right )} + 2 \, c}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="giac")

[Out]

1/2*(2*d*x - sqrt(2)*(d*x + c + arctan(-(sqrt(2)*sin(2*d*x + 2*c) - 2*sin(2*d*x + 2*c))/(sqrt(2)*cos(2*d*x + 2
*c) + sqrt(2) - 2*cos(2*d*x + 2*c) + 2))) + 2*c)/d

________________________________________________________________________________________

maple [A]  time = 0.13, size = 30, normalized size = 0.59 \[ -\frac {\sqrt {2}\, \arctan \left (\tan \left (d x +c \right ) \sqrt {2}\right )}{2 d}+\frac {d x +c}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x)

[Out]

-1/2/d*2^(1/2)*arctan(tan(d*x+c)*2^(1/2))+1/d*(d*x+c)

________________________________________________________________________________________

maxima [B]  time = 0.58, size = 252, normalized size = 4.94 \[ \frac {4 \, d x - \sqrt {2} \arctan \left (\frac {2 \, \sqrt {2} \sin \left (d x + c\right )}{2 \, {\left (\sqrt {2} + 1\right )} \cos \left (d x + c\right ) + \cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sqrt {2} + 3}, \frac {\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) - 1}{2 \, {\left (\sqrt {2} + 1\right )} \cos \left (d x + c\right ) + \cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sqrt {2} + 3}\right ) + \sqrt {2} \arctan \left (\frac {2 \, \sqrt {2} \sin \left (d x + c\right )}{2 \, {\left (\sqrt {2} - 1\right )} \cos \left (d x + c\right ) + \cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \sqrt {2} + 3}, \frac {\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) - 1}{2 \, {\left (\sqrt {2} - 1\right )} \cos \left (d x + c\right ) + \cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \sqrt {2} + 3}\right ) + 4 \, c}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x, algorithm="maxima")

[Out]

1/4*(4*d*x - sqrt(2)*arctan2(2*sqrt(2)*sin(d*x + c)/(2*(sqrt(2) + 1)*cos(d*x + c) + cos(d*x + c)^2 + sin(d*x +
 c)^2 + 2*sqrt(2) + 3), (cos(d*x + c)^2 + sin(d*x + c)^2 + 2*cos(d*x + c) - 1)/(2*(sqrt(2) + 1)*cos(d*x + c) +
 cos(d*x + c)^2 + sin(d*x + c)^2 + 2*sqrt(2) + 3)) + sqrt(2)*arctan2(2*sqrt(2)*sin(d*x + c)/(2*(sqrt(2) - 1)*c
os(d*x + c) + cos(d*x + c)^2 + sin(d*x + c)^2 - 2*sqrt(2) + 3), (cos(d*x + c)^2 + sin(d*x + c)^2 - 2*cos(d*x +
 c) - 1)/(2*(sqrt(2) - 1)*cos(d*x + c) + cos(d*x + c)^2 + sin(d*x + c)^2 - 2*sqrt(2) + 3)) + 4*c)/d

________________________________________________________________________________________

mupad [B]  time = 0.62, size = 62, normalized size = 1.22 \[ x-\frac {\sqrt {2}\,\left (2\,\mathrm {atan}\left (\frac {\sqrt {2}\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}+\frac {7\,\sqrt {2}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}\right )+2\,\mathrm {atan}\left (\frac {\sqrt {2}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}\right )\right )}{4\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)/(sin(c + d*x) + 1/sin(c + d*x)),x)

[Out]

x - (2^(1/2)*(2*atan((7*2^(1/2)*tan(c/2 + (d*x)/2))/4 + (2^(1/2)*tan(c/2 + (d*x)/2)^3)/4) + 2*atan((2^(1/2)*ta
n(c/2 + (d*x)/2))/4)))/(4*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sin {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + \csc {\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(csc(d*x+c)+sin(d*x+c)),x)

[Out]

Integral(sin(c + d*x)/(sin(c + d*x) + csc(c + d*x)), x)

________________________________________________________________________________________